package cn.signalpha.modules.social.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类
 *
 * @author signalpha
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("social_topic")
@ApiModel(value = "Topic对象", description = "论坛主题")
public class Topic implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
	@TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

	@ApiModelProperty(value = "用户id")
	private Long userId;

	@ApiModelProperty(value = "分类id")
	private Long categoryId;

	@ApiModelProperty(value = "标签，中文逗号分隔")
	private String tag;

	@ApiModelProperty(value = "标题")
	private String title;

    @ApiModelProperty(value = "图片")
    private String img;

	@ApiModelProperty(value = "视频")
	private String video;

	@ApiModelProperty(value = "内容")
	private String content;

//	@ApiModelProperty(value = "关联id")
//	private Long targetId;
//
//	@ApiModelProperty(value = "关联类型：1商品")
//	private Integer targetType;

	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
	@ApiModelProperty(value = "关联商品")
	private String target;

    @ApiModelProperty(value = "点击量")
    private Integer clickNum;

    @ApiModelProperty(value = "点赞量")
    private Integer likeNum;

	@ApiModelProperty(value = "评论量")
	private Integer commentNum;

	@ApiModelProperty(value = "排序值")
	private Integer sort;

	@ApiModelProperty(value = "是否显示")
	private Integer isShow;

	@ApiModelProperty(value = "是否允许评论")
	private Integer isComment;

	@ApiModelProperty(value = "状态：-1不通过 0待审核 1通过")
	private Integer status;

	@ApiModelProperty(value = "审核备注")
	private String remark;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

	@TableLogic
	@ApiModelProperty(value = "是否删除")
	private Integer isDeleted;

}
